
* ********************************************************************* *;
* ********************************************************************* *;
* This readme file provides all information to replicate the results in *;
*                                                                       *;
*         Brambor, Thomas, William Roberts Clark, Matt Golder.2007.     *;
*         "Are African party systems different?" Electoral Studies      *;
*                                                                       *;
* Any questions regarding this code should be directed to Thomas Brambor*;
* Department of Politics, Stanford University (tbrambor@stanford.edu)   *;
*                            January 8, 2007                            *;
* ********************************************************************* *;
* ********************************************************************* *;

Note: In the fourth line of each .do file a working directory is
specified. Please change that directory to the folder in which you
unpacked the contents of the zip file so that output files (log
files, data files, graphs) are saved in the appropriate folders.

* ********************************************************************* *;
*                   The Data  - (see folder /getdata)                   *;
* ********************************************************************* *;

All analyses are conducted using the following three primary data sets:

     1. STATA_mozaffar.dta  Converted original STATA data from Mozaffar
     2. XLS_mozaffar.dta    Converted original Excel data from Mozaffar
     3. golder1.dta         Additional data from Golder (2005)

The remainder of this data section only discusses the assembly of
the above mentioned three data sets and can be skipped by those only
interested in the actual analyses.

These are the all the datasets used in our paper and the do-files
related to creating them.

mozaffar.dta
    This is the original STATA dataset found on Shaheen Mozaffar's
    website http://webhost.bridgew.edu/smozaffar/

mozaffar.xls
    This is the original Excel dataset found on Shaheen Mozaffar's
    website http://webhost.bridgew.edu/smozaffar/

mozaffar_xls.dta
    This is just mozaffar.xls but in STATAformat

XLS_mozaffar.dta
    This is the same dataset as mozaffar_xls.dta except that the
    variables have been renamed and relabeled to have sensible names
    using getdata1xls_mozaffar.do. This dataset is then merged with
    golder1.dta so that the years for each observation are included.

getdata1xls_mozaffar.do
    This is the do-file creating XLS_mozaffar.dta

STATA_mozaffar.dta
    This is the same dataset as mozaffar.dta except that the variables
    have been renamed and relabeled to have sensible names using
    getdata1_mozaffar.do. This dataset is then merged with golder1.dta
    so that the years for each observation are included.

getdata1_mozaffar.do
    This is the do-file creating STATA_mozaffar.dta

golder1.dta
    This dataset includes data on the same countries and elections as
    the other datasets, except that the data come from a slightly
    revised version of Golder (2005) "Democratic Electoral Systems
    Around the World, 1946-2000". This data is then merged with the
    ethnic variables taken from STATA_mozaffar.dta

* ********************************************************************* *;
*         Replication Attempts - (see folder /replication)              *;
* ********************************************************************* *;

These are the do-files we wrote trying to replicate the results in
Mozaffar et al. (2003)

electoralparties_replication.do
    This do-file attempts to replicate the results found in Table 1 of
    Mozaffar, Scarritt and Galaich's 2003 analysis of the determinants
    of electoral parties using STATA_mozaffar.dta.

electoralparties_replication_xls.do
    This do-file attempts to replicate the results found in Table 1 of
    Mozaffar, Scarritt and Galaich's 2003 analysis of the determinants
    of electoral parties using XLS_mozaffar.dta.

legislativeparties_replication.do
    This do-file attempts to replicate the results found in Table 2 of
    Mozaffar, Scarritt and Galaich's 2003 analysis of the determinants
    of legislative parties using STATA_mozaffar.dta.

legislativeparties_replication_xls.do
    This do-file attempts to replicate the results found in Table 2 of
    Mozaffar, Scarritt and Galaich's 2003 analysis of the determinants
    of legislative parties using STATA_mozaffar.dta.

* ********************************************************************* *;
*             Results and Figures - (see folder /results)               *;
* ********************************************************************* *;

These are all the do-files necessary to replicate all of the results
and figures mentioned in the paper.

legislativeparties.do
    Provides the results in Table 1.

unconditionalfragmentation.do
    Mozaffar et al. make some claims in footnote 7 of their article
    that ethnic fragmentation independently reduces the number of
    parties if we specify an unconditional model.  We reject these
    claims.  This file provides the results of our attempts to
    replicate their claims. This test is referred to on page
    5 of our article.

fragmentationfig_FIG1.do
    Creates Figure 1 indicating the effect of ethnic
    fragmentation on the effective number of electoral and legislative
    parties using MSG's data (left graph) and the corrected data
    from Golder (2005) with recoded concentration scores.
    Specifically, those countries that were coded as having
    concentration=0 but which had exactly one ethnic group were
    recoded as having a concentration score of 3. This do-file then
    creates the figure indicating the effect of ethnic fragmentation
    now.

magnitudefig_FIG2.do
    Creates Figure 2 indicating the effect of district
    magnitude on the number of parties using using MSG's data
    (left graph) and the corrected data from Golder (2005) with
    recoded concentration scores (see above).

* ********************************************************************* *;
*          Additional Analyses - (see folder /addresults)               *;
* ********************************************************************* *;

These are additional .do files conducting extra analyses.

electoralparties.do
    The paper only shows our analysis for legislative parties.
    Substantiating our claim in footnote 2, this file shows that our
    claims hold when using electoral parties as the dependent variable
    as well.

electoralparties_golder.do
    This do-file essentially replicates everything that we do using
    STATA_mozaffar.dta concerning electoral parties with the more
    correct dataset golder1.dta. It also presents a number of
    graphs explicating the interactive relationships of the variables.

legislativeparties_golder.do
    This do-file essentially replicates everything that we do using
    STATA_mozaffar.dta concerning legislative parties with the more
    correct dataset golder1.dta. It also presents a number of
    graphs explicating the interactive relationships of the variables.

presidentialfig.do
    Creates a figure indicating the effect of temporally-proximate
    presidential elections on the effective number of electoral and
    legislative parties.

* ********************************************************************* *;
*                                   The End                             *;
* ********************************************************************* *;
